<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户管理信息</title>
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/css/public.css">
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/js/sorttable.js"></script>
		<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/public.js"></script>
		<script  language="JavaScript"
			src="${pageContext.request.contextPath}/js/validate.js"></script>
		<script type="text/javascript">
	  	function validate(){	
			var username = document.getElementById("username");
			var userdesc = document.getElementById("userdesc");
			var password = document.getElementById("password");
			var confirmpassword = document.getElementById("confirmpassword");
					
			if(!isNotNull(username,'用户名')||!f_check_ZhOrNumOrLett(username,'用户名')||!f_check_stringLength(username,'用户名',12))
				return false ;	
			
			if(!(isNotNull(userdesc,'说明')&&f_check_ZhOrNumOrLett(userdesc,'说明')&&f_check_stringLength(userdesc,'说明',12)))
				return false ;	
			if(!(isNotNull(password,'密码')&&f_check_NumOrLett(password,'密码')&&f_check_passwordLength(password,'密码',4,8)))
				return false ;	
			if(!(isNotNull(confirmpassword,'确认密码')&&f_check_NumOrLett(confirmpassword,'确认密码')&&checkStringObjs(password,confirmpassword,'密码','确认密码'))&&f_check_passwordLength(confirmpassword,'确认密码',4,8))
				return false ;	
		} 
		</script>
	</head>
	<body>
		<div id="info_all" style="width:300px;">
			<div id="info_top">
				用户修改
			</div>
				<div  style="width:280px;margin-top:0px;" >
				<s:form action="editUser" onsubmit="return validate()" theme="simple" >
				<input type="hidden" name="editedUser.userId"  size="12" value="${editedUser.userId}"/>
					<table style="margin-top:10px;background:#fbfbfb;color:#403040;" align="center">
						<tr>
							<td>
								用户名&nbsp;：
							</td>
							<td align="center">
								<input type="text" name="editedUser.userName" id="username" size="12" value="${editedUser.userName}"/>
							</td>
						</tr>
						<tr>
							<td>
								说 &nbsp; &nbsp;明：
							</td>
							<td align="center">
								<input type="text" name="editedUser.userDesc" id="userdesc" size="12"   value="${editedUser.userDesc}"/>
							</td>
						</tr>
						<tr>
							<td>
								密 &nbsp; &nbsp;码：
							</td>
							<td align="center">
								<input type="password" name="editedUser.password" id="password" size="12"  value="${editedUser.password}"/>
							</td>
						</tr>
						<tr>
							<td>
								确认密码：
							</td>
							<td align="center">
								<input type="password" name="confirmpassword" id="confirmpassword"
									size="12" value="${editedUser.password}"/>
							</td>
						</tr>
						<tr>
							<td>
								职员：
							</td>
							<td align="center">
								<s:hidden name="candiateDTO.candiate.candiateId" id="candiateId" ></s:hidden>
								<s:textfield name="candiateDTO.candiate.candiateName" id="candiateName"  size="12" readonly="true"></s:textfield>
								<img src="images/kookup.gif" style="cursor:pointer" onclick="openWin('selectCandiate.action','candiate',1050,700,0)">
							</td>
						</tr>
						<tr>
							<td>
								&nbsp;&nbsp;
								<input type="submit" value="保存" onFocus="this.blur()"
									onmouseover="this.className='btnover'"
									onmouseout="this.className='btnout'" class="btnsize" />
							</td>
							<td align="center">
								<input type="button" value="返回" onFocus="this.blur()" onclick="history.go(-1)"
									onmouseover="this.className='btnover'"
									onmouseout="this.className='btnout'" class="btnsize" />

							</td>
						</tr>
					</table>
							</s:form>
				</div>
		</div>

	</body>
</html>